Extract the PHP version alias table into a shared script - #51
Merged
Conversation
The table was inline in action.yml, so nothing outside this action could resolve the aliases without copying the numbers.
10 tasks
10 tasks
sgiehl
approved these changes
Aug 24, 2026
Contributor
Author
|
Thank you @sgiehl Can you please merge, since I don't have authorization for this repo? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Split out of #49 so it can be reviewed on its own, because it is the only part of that PR that belongs to this action regardless of where the plugin quality workflows end up living.
The PHP version alias table (
matomo5_min_phpand friends) was acasestatement inline inaction.yml, so nothing outside this action could resolve the aliases without copying the numbers. This moves the table toscripts/bash/resolve_php_version.shand hasaction.ymlcall it — the same pattern as the other shared scripts here, which means a workflow in another repository can resolve the same values by checking this repository out at a pinned ref.No behaviour change: all six cases resolve exactly as before (
7.2,8.5,8.1,8.5, literal passthrough, and empty). Empty input previously ended the step withexit 0and now returns an empty string; theSetup PHPstep is already guarded withif: steps.resolve-php.outputs.version != '', so it is still skipped.One incidental hardening rides along on the same lines: the input now reaches the script through
env:instead of being interpolated into the shell as${{ inputs.php-version }}, so a caller-supplied value is never expanded as shell.Review